package com.bys.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bys.generator.base.BaseModel;
import java.io.Serializable;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* PackageName:  com.bys.system.model
* ClassName:    SysMenuModel
* Description:  菜单表实体类
* Author:       bys
* Date:         2023-03-31
**/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "sys_menu", autoResultMap = true)
@Schema(description = "菜单表实体类")
public class SysMenuModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    @Schema(description = "所属上级")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "类型(0:目录,1:菜单,2:按钮)")
    @TableField("`type`")
    private Integer type;

    @Schema(description = "路由地址")
    @TableField("path")
    private String path;

    @Schema(description = "组件路径")
    @TableField("component")
    private String component;

    @Schema(description = "权限标识")
    @TableField("perms")
    private String perms;

    @Schema(description = "图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "排序")
    @TableField("sort_value")
    private Integer sortValue;

    @Schema(description = "状态(0:禁止,1:正常)")
    @TableField("`status`")
    private Integer status;
    // 下级列表
    @TableField(exist = false)
    private List<SysMenuModel> children;
    //是否选中
    @TableField(exist = false)
    private boolean isSelect;


}